package org.dromara.tms.domain.bo;

import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.tms.domain.Order;

import java.util.Date;

/**
 * 订单业务对象 tms_order
 *
 * @author wulongbo
 * @date 2024-10-26
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = Order.class, reverseConvertGenerate = false)
public class OrderBo extends BaseEntity {

    /**
     * 逻辑主键（简单自增主键）
     */
    @NotNull(message = "逻辑主键（简单自增主键）不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 运单号
     */
    @NotBlank(message = "运单号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String orderNo;

    /**
     * 第三方入库单号
     */
    @NotBlank(message = "第三方入库单号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String inboundNo;

    /**
     * 物流运单号
     */
    @NotBlank(message = "物流运单号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String logisticsNo;

    /**
     * 集货方式数据字典键值
     */
    @NotBlank(message = "集货方式数据字典键值不能为空", groups = { AddGroup.class, EditGroup.class })
    private String storeType;

    /**
     * 目的地国家数据字典键值
     */
    @NotBlank(message = "目的地国家数据字典键值不能为空", groups = { AddGroup.class, EditGroup.class })
    private String countryType;

    /**
     * 运输方式数据字典键值
     */
    @NotBlank(message = "运输方式数据字典键值不能为空", groups = { AddGroup.class, EditGroup.class })
    private String transportType;

    /**
     * 海外仓送仓方式数据字典键值
     */
    @NotBlank(message = "海外仓送仓方式数据字典键值不能为空", groups = { AddGroup.class, EditGroup.class })
    private String deliveryMethod;

    /**
     * 货物类型数据字典
     */
    @NotBlank(message = "货物类型数据字典 不能为空", groups = { AddGroup.class, EditGroup.class })
    private String omsGoodsType;

    /**
     * 货物类型数据字典
     */
    private String goodsType;

    /**
     * 单独报关数据字典键值
     */
    @NotBlank(message = "单独报关数据字典键值不能为空", groups = { AddGroup.class, EditGroup.class })
    private String customsDeclaration;

    /**
     * 交货方式数据字典键值
     */
    @NotBlank(message = "交货方式数据字典键值不能为空", groups = { AddGroup.class, EditGroup.class })
    private String dealMethod;

    /**
     * 运单状态（0：草稿、1：待入仓（在途）、2：等待装柜（已测量）、3：已装柜（报关中）、4：已发运（运输中）、5：已抵达（清关中）、6：派送中、7：已签收）
     */
    private String orderType;

    /**
     * 部门ID
     */
    private Long deptId;

    /**
     * 预报方数
     */
    @NotNull(message = "预报方数不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long preVolume;

    /**
     * 基础信息订单备注
     */
    @NotBlank(message = "基础信息订单备注不能为空", groups = { AddGroup.class, EditGroup.class })
    private String remake;

    /**
     * 仓库id
     */
    @NotNull(message = "仓库id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long warehouseId;

    /**
     * 收货地址id
     */
    @NotNull(message = "收货地址id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long addressId;

    /**
     * 箱唛
     */
    private String boxLabel;

    /**
     * 生成箱唛详情的url
     */
    private String boxLabelUrl;

    /**
     * 上传的签收单url
     */
    private String signatureFormUrl;

    /**
     * 拆箱标记（0：未拆箱，1：已拆箱）
     */
    private Long unBoxingFlag;

    /**
     * 测量时间
     */
    private Date measureTime;

    /**
     * 装柜时间
     */
    private Date packingTime;

    /**
     * 发运时间
     */
    private Date shippedTime;

    /**
     * 清关时间
     */
    private Date arrivedTime;

    /**
     * 派送时间
     */
    private Date deliveryTime;

    /**
     * 完成时间
     */
    private Date signedTime;

    /**
     * 预计到港时间
     */
    private Date predictArrivedTime;

    /**
     * 待入仓时间
     */
    private Date inTransitTime;


}
